package com.yuantu.judiciary.dao;

import com.yuantu.judiciary.model.domain.SysConfigDO;
import com.yuantu.judiciary.model.enums.ConfigType;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * 系统配置
 *
 * @author syw
 * @since 2023-08-22
 **/
public interface ISysConfigDao extends JpaRepository<SysConfigDO, Long> {

    SysConfigDO findFirstByTypeAndDeletedFalse(ConfigType type);

    @Query("select distinct s.remarks from SysConfigDO s where s.type = 'WARNING_PHONE' and s.deleted = false")
    List<String> getWarningPhones();

}
